home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
CMPLTPAS
/
RSTRSCRN.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-07-17
|
1KB
|
37 lines
{->>>>RestoreScreen<<<<----------------------------------------}
{ }
{ Filename : RSTRSCRN.SRC -- Last Modified 7/14/88 }
{ }
{ This routine accepts a pointer generated by the SaveScreen }
{ routine and brings back the saved display buffer from the }
{ heap and loads it into the refresh buffer of the display }
{ card. }
{ }
{ From: COMPLETE TURBO PASCAL 5.0 by Jeff Duntemann }
{ Scott, Foresman & Co., Inc. 1988 ISBN 0-673-38355-5 }
{--------------------------------------------------------------}
PROCEDURE RestoreScreen(StashPtr : Pointer);
TYPE
VidPtr = ^VidSaver;
VidSaver = RECORD
Base,Size : Word;
BufStart : Byte
END;
VAR
VidVector : VidPtr;
VidBuffer : Pointer;
DataSize : Word;
BEGIN
VidVector := StashPtr; { Cast generic pointer onto VidSaver pointer }
DataSize := VidVector^.Size;
{ Create a pointer to the base of the video buffer: }
VidBuffer := Ptr(VidVector^.Base,0);
{ Move the buffer portion of the data on the heap to the video buffer: }
Move(VidVector^.BufStart,VidBuffer^,VidVector^.Size);
FreeMem(StashPtr,DataSize + 4);
END;